<?php

class Singleton
{

    private $singletons = array();

    public function setSingleton($name, $item) {
        $this->singletons[$name] = $item;
    }

    public function getSingleton($name) {
        if (isset($this->singletons[$name])) {
            return $this->singletons[$name];
        } else {
            return false;
        }
    }

    public static function removeSingleton($name) {
        if (isset($this->singletons[$name])) {
            unset($this->singletons[$name]);
        }
    }

}